package magnetic.field.arduino;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.PrintStream;

public class Mapeamento {
	FileOutputStream out; //Arquivo de saída
	PrintStream p;		  //Classe para escrita de saída
	public Mapeamento() {
		
		
		//*************Instanciamento das classes manipuladoras de arquivos********************

		try {
			out = new FileOutputStream("banco");
			p = new PrintStream(out);


		int min = 1;
		int max = 500;

		int i, j;

		for (i = 0; i <= 9; i++) {
			p.print(i+"\n");
			for (j = 0; j <= 3; j++) {
				int x = min + (int) ((max - min) * Math.random());
				int y = min + (int) ((max - min) * Math.random());
				int z = min + (int) ((max - min) * Math.random());
				p.print(x + " " + y + " " + z
						+ " " + j+"\n");
			}
		}
		p.close();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public static void main(String[] args) {
		Mapeamento a = new Mapeamento();
	}
}
